<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib tagdir="/WEB-INF/tags/" prefix="p"%>
<table class="table table-striped bordered">
	<tr>
		<th class="span1">Id</th>
		<th class="span1">Code</th>
		<th class="span3">Titre</th>
		<th class="span2">Certification</th>
		<th class="span2">Pre-requis</th>
	</tr>



	<c:forEach var="entry" items="${containerList}" varStatus="status">
		<tr>

			<td class="span1">${entry.formation.idFormation}</td>
			<td class="span1" style="width: 5%;">${entry.formation.code}</td>
			<td class="span3" style="width: 55%;"><p>
					<strong>${entry.formation.titre}</strong>
				</p>

				<ul class="nav nav-tabs" id="infoTab${entry.formation.idFormation}">
					<li class="active"><a
						href="#objectif${entry.formation.idFormation}">Objectif</a></li>
					<li><a href="#sessionsOuvertes${entry.formation.idFormation}">Sessions
							Ouvertes</a></li>
					<li><a href="#sessionsFutures${entry.formation.idFormation}">Sessions
							Futures</a></li>
					<li><a href="#themes${entry.formation.idFormation}">Thèmes</a></li>
				</ul>

				<div class="tab-content">
					<div class="tab-pane active"
						id="objectif${entry.formation.idFormation}">
						<p>${entry.formation.objectif}</p>
					</div>
					<div class="tab-pane"
						id="sessionsOuvertes${entry.formation.idFormation}">



						<table class="table table-striped bordered">
							<tr>
								<th class="span1">Id</th>
								<th class="span1">Date debut</th>
								<th class="span3">Date fin</th>
								<th class="span3">Place disponible</th>
								<th class="span2">Tarif (€)</th>
								<th class="span2"></th>
							</tr>

							<c:forEach var="session" items="${entry.sessionsOuvertes}">

								<tr>
									<td>${session.idSession}</td>
									<td>${session.dateDebut}</td>
									<td>${session.dateFin}</td>
									<td>${session.nbMaxPlaces}</td>
									<td>${session.tarif}</td>
									<td><a href="/AgriotesSVN/inscription/&sessionID=${session.idSession}">S'inscrire</a></td>
								</tr>

							</c:forEach>
						</table>
					</div>
					<div class="tab-pane"
						id="sessionsFutures${entry.formation.idFormation}">


						<table class="table table-striped bordered">
							<tr>
								<th class="span1">Id</th>
								<th class="span1">Date debut</th>
								<th class="span3">Date fin</th>
								<th class="span3">Place disponible</th>
								<th class="span2">Tarif (€)</th>
								<th class="span2"></th>
							</tr>

							<c:forEach var="session" items="${entry.sessionsFutures}">

								<tr>
									<td>${session.idSession}</td>
									<td>${session.dateDebut}</td>
									<td>${session.dateFin}</td>
									<td>${session.nbMaxPlaces}</td>
									<td>${session.tarif}</td>
									<td><a href="/AgriotesSVN/inscription/&sessionID=${session.idSession}">S'inscrire</a></td>
								</tr>

							</c:forEach>
						</table>
					</div>



					<div class="tab-pane" id="themes${entry.formation.idFormation}">


						<table class="table table-striped bordered">
							<tr>
								<th class="span1">Id</th>
								<th class="span1">Libelle</th>
							</tr>

							<c:forEach var="theme" items="${entry.themes}">

								<tr>
									<td>${theme.id_theme}</td>
									<td>${theme.libelle}</td>
								</tr>

							</c:forEach>
						</table>

					</div>

				</div></td>
			<td class="span2" style="width: 15%;">${entry.formation.certification}</td>
			<td class="span2" style="width: 15%;">${entry.formation.prerequis}</td>
		</tr>

	</c:forEach>
</table>




